package com.geese.module.user.model;

import java.util.Date;

import com.geese.common.dto.BaseDto;
import com.geese.common.entity.Account;
import com.geese.common.entity.User;

/**
 * yfy
 */
public class SecurityUser extends BaseDto {
	
	private static final long serialVersionUID = 1L;
	private Account account;
	private User user;
	private String extra ;
	
	public SecurityUser(Account account, User user, String extra) {
		this.user = user;
		this.account = account;
		this.extra = extra;
	}
	
	public SecurityUser(Account account, User user) {
		this.user = user;
		this.account = account;
	}
	
    public Integer getUserId() {
        return user.getId();
    }

    public Integer getUserType() {
        return user.getUserType();
    }

    public Integer getAccountId() {
        return account.getId();
    }
    
    public Date getLastPasswordReset() {
    	return account.getLastPasswordReset();
    }

    /**
     * 姓名
     */
    public String getUserName() {
        return user.getUsername();
    }
    
    /**
     * 账号
     */
    public String getAccount() {
        return account.getAccount();
    }

    public String getMobile() {
        return user.getMobile();
    }
    
    /**
     * 获取额外参数
     */
    public String getExtra() {
		return extra;
	}

	public void setExtra(String extra) {
		this.extra = extra;
	}

}
